/*
 *  txdnet.cn tonydon
 * 
 */
package cn.txdnet.txcms.domain;

import cn.txdnet.txweb.annotation.validation.ClearXss;
import cn.txdnet.txweb.annotation.validation.CurrTime;
import cn.txdnet.txweb.annotation.validation.Default;
import cn.txdnet.txweb.annotation.validation.Match;
import cn.txdnet.txweb.annotation.validation.NotEmpty;
import cn.txdnet.txweb.annotation.validation.Size;
import cn.txdnet.txweb.annotation.validation.Validator;

/**
 * 活动事件对象
 * @author txdnet
 */
public class HotShop extends BaseEntity{
    private static final long serialVersionUID = 5944147927183611915L;
    
    private Long shopid;
    
    @Default
    private Integer cid;
    
    @Default("0")
    private String ctp;
    
    @NotEmpty
    @ClearXss
    @Size(min=1,max=32)
    private String shopname;
    
    @NotEmpty
    @Size(min=1,max=250)
    @ClearXss
    @Default("-")
    private String summary;
    
    @Default("-")
    private String pic;
    
    @Default("-")
    private String url;
    
    @Default(byteVal=0)
    private Byte shoptype;
    
    @Default("-")
    private String qq;
    
    @Default("-")
    private String tbnick;
    
    @CurrTime
    private Long pubtime;
    
    @Default(longVal=0)
    private Long updatetime;
    
    @NotEmpty
    @Match(Match.RegexType.EMAIL)
    private String email;
    
    @Default("-")
    private String rndkey;
    
    @Default(longVal=0)
    private Long createkeytime;
    
    @Default(intVal=0)
    private Integer hitnum;
    
    @Default
    private Float scorerate;
    
    @Default("-")
    private String local;
    
    @Default
    private Byte pubstate;
    
    @Default
    private Byte iscmt;
    
    @Override
    public boolean validate() {
        return Validator.validate(this);
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 37 * hash + (this.shopid != null ? this.shopid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final HotShop other = (HotShop) obj;
        if (this.shopid != other.shopid && (this.shopid == null || !this.shopid.equals(other.shopid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "HotShop{" + "shopid=" + shopid + ", cid=" + cid + ", ctp=" + ctp + ", shopname=" + shopname + ", summary=" + summary + ", pic=" + pic + ", url=" + url + ", shoptype=" + shoptype + ", qq=" + qq + ", tbnick=" + tbnick + ", pubtime=" + pubtime + ", updatetime=" + updatetime + ", email=" + email + ", rndkey=" + rndkey + ", createkeytime=" + createkeytime + ", hitnum=" + hitnum + ", scorerate=" + scorerate + ", local=" + local + ", pubstate=" + pubstate + ", iscmt=" + iscmt + '}';
    }

    
    /**
     * @return the shopid
     */
    public Long getShopid() {
        return shopid;
    }

    /**
     * @param shopid the shopid to set
     */
    public void setShopid(Long shopid) {
        this.shopid = shopid;
    }


    /**
     * @return the cid
     */
    public Integer getCid() {
        return cid;
    }

    /**
     * @param cid the cid to set
     */
    public void setCid(Integer cid) {
        this.cid = cid;
    }

    /**
     * @return the ctp
     */
    public String getCtp() {
        return ctp;
    }

    /**
     * @param ctp the ctp to set
     */
    public void setCtp(String ctp) {
        this.ctp = ctp;
    }

    /**
     * @return the shopname
     */
    public String getShopname() {
        return shopname;
    }

    /**
     * @param shopname the shopname to set
     */
    public void setShopname(String shopname) {
        this.shopname = shopname;
    }

    /**
     * @return the summary
     */
    public String getSummary() {
        return summary;
    }

    /**
     * @param summary the summary to set
     */
    public void setSummary(String summary) {
        this.summary = summary;
    }

    /**
     * @return the pic
     */
    public String getPic() {
        return pic;
    }

    /**
     * @param pic the pic to set
     */
    public void setPic(String pic) {
        this.pic = pic;
    }

    /**
     * @return the url
     */
    public String getUrl() {
        return url;
    }

    /**
     * @param url the url to set
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * @return the shoptype
     */
    public Byte getShoptype() {
        return shoptype;
    }

    /**
     * @param shoptype the shoptype to set
     */
    public void setShoptype(Byte shoptype) {
        this.shoptype = shoptype;
    }

    /**
     * @return the qq
     */
    public String getQq() {
        return qq;
    }

    /**
     * @param qq the qq to set
     */
    public void setQq(String qq) {
        this.qq = qq;
    }

    /**
     * @return the tbnick
     */
    public String getTbnick() {
        return tbnick;
    }

    /**
     * @param tbnick the tbnick to set
     */
    public void setTbnick(String tbnick) {
        this.tbnick = tbnick;
    }

    /**
     * @return the pubtime
     */
    public Long getPubtime() {
        return pubtime;
    }

    /**
     * @param pubtime the pubtime to set
     */
    public void setPubtime(Long pubtime) {
        this.pubtime = pubtime;
    }

    /**
     * @return the updatetime
     */
    public Long getUpdatetime() {
        return updatetime;
    }

    /**
     * @param updatetime the updatetime to set
     */
    public void setUpdatetime(Long updatetime) {
        this.updatetime = updatetime;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the rndkey
     */
    public String getRndkey() {
        return rndkey;
    }

    /**
     * @param rndkey the rndkey to set
     */
    public void setRndkey(String rndkey) {
        this.rndkey = rndkey;
    }

    /**
     * @return the createkeytime
     */
    public Long getCreatekeytime() {
        return createkeytime;
    }

    /**
     * @param createkeytime the createkeytime to set
     */
    public void setCreatekeytime(Long createkeytime) {
        this.createkeytime = createkeytime;
    }

    /**
     * @return the hitnum
     */
    public Integer getHitnum() {
        return hitnum;
    }

    /**
     * @param hitnum the hitnum to set
     */
    public void setHitnum(Integer hitnum) {
        this.hitnum = hitnum;
    }

    /**
     * @return the scorerate
     */
    public Float getScorerate() {
        return scorerate;
    }

    /**
     * @param scorerate the scorerate to set
     */
    public void setScorerate(Float scorerate) {
        this.scorerate = scorerate;
    }

    /**
     * @return the local
     */
    public String getLocal() {
        return local;
    }

    /**
     * @param local the local to set
     */
    public void setLocal(String local) {
        this.local = local;
    }

    /**
     * @return the pubstate
     */
    public Byte getPubstate() {
        return pubstate;
    }

    /**
     * @param pubstate the pubstate to set
     */
    public void setPubstate(Byte pubstate) {
        this.pubstate = pubstate;
    }

    /**
     * @return the iscmt
     */
    public Byte getIscmt() {
        return iscmt;
    }

    /**
     * @param iscmt the iscmt to set
     */
    public void setIscmt(Byte iscmt) {
        this.iscmt = iscmt;
    }
    
}
